STEP 2: Let's set up some variables for our game. We need to create these before we can use them!

  • Go to LOGIC and to drag out Empty List. Change its name from my_list to image_labels.
  • Change image_labels to be equal to this list: ["garbage", "plasticbag", "steelcan", "sodacan"]
  • From , drag out Integer Variable. Change its name to timer and change its value to 1.

We'll use these variables later on in our game, including choosing randomly from image_labels to make sprites.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)